<template>
  <common_print_dialog ref="common_print_dialog"
    printUrl="/wms-api/outbound/OutboundBoxPackageRpc/printPdfList.json" :templateVisiable="false" singlePrintNumber
    :printHandler="(data, list) => {
      return {
        paramList: list.map(it => {
          return {
            clientId: data.clientName,
            printerName: data.printerName,
            printCount: it.printNum,
            fileName: it.fileName,
            fileType: $reg.FileExt(it.filePath),//data.fileType,
            labelOssPath: it.filePath,
          }
        })
      }
    }" :tableModel="tableModel" :urlGetFun="urlGetFun" />
</template>

<script>
import common_print_dialog from './common_print_dialog.vue'

export default {
  components: { common_print_dialog },
  data() {
    return {

    }
  },
  props: {
    tableModel: {
      type: Array,
      default: () => []
    },
    urlGetFun: {
      type: Function,
      default: (row) => ({ url: row.filePath, oss: true })
    },

  },
  methods: {
    show(r, option) {
      this.$refs.common_print_dialog.show(r, option)
    },
    printDefaultOption(option) {
      this.$refs.common_print_dialog.printDefaultOption(option)
    },
  }
}
</script>
